package prometheus

// FormatMode switches between Table, Time series, or Heatmap. Table will only work
// in the Table panel. Heatmap is suitable for displaying metrics of the
// Histogram type on a Heatmap panel. Under the hood, it converts cumulative
// histograms to regular ones and sorts series by the bucket bound.
type FormatMode string

const (
	FormatTable      FormatMode = "table"
	FormatHeatmap    FormatMode = "heatmap"
	FormatTimeSeries FormatMode = "time_series"
)

// Option represents an option that can be used to configure a prometheus query.
type Option func(target *Prometheus)

// Prometheus represents a prometheus query.
type Prometheus struct {
	Ref            string
	Hidden         bool
	Expr           string
	IntervalFactor int
	Interval       string
	Step           int
	LegendFormat   string
	Instant        bool
	Format         string
}

// New creates a new prometheus query.
func ( string,  ...Option) *Prometheus {
	 := &Prometheus{
		Expr:   ,
		Format: string(FormatTimeSeries),
	}

	for ,  := range  {
		()
	}

	return 
}

// Legend sets the legend format.
func ( string) Option {
	return func( *Prometheus) {
		.LegendFormat = 
	}
}

// Ref sets the reference ID for this query.
func ( string) Option {
	return func( *Prometheus) {
		.Ref = 
	}
}

// Hide the query. Grafana does not send hidden queries to the data source,
// but they can still be referenced in alerts.
func () Option {
	return func( *Prometheus) {
		.Hidden = true
	}
}

// Instant marks the query as "instant, which means Prometheus will only return the latest scrapped value.
func () Option {
	return func( *Prometheus) {
		.Instant = true
	}
}

// Format indicates how the data should be returned.
func ( FormatMode) Option {
	return func( *Prometheus) {
		.Format = string()
	}
}

// IntervalFactor sets the resolution factor.
func ( int) Option {
	return func( *Prometheus) {
		.IntervalFactor = 
	}
}